SUBROUTINE stiff10(km,coord,ym,pr)
!
!    exact stiffness matrix of a 10-node triangle
!    with straight sides in plane strain
!
 IMPLICIT NONE
 INTEGER::i,j
 INTEGER,PARAMETER::iwp=SELECTED_REAL_KIND(15)
 REAL(iwp),INTENT(IN)::coord(10,2),ym,pr
 REAL(iwp),INTENT(OUT)::km(20,20)
 REAL(iwp)::x1,x4,x7,y1,y4,y7,cf
 REAL(iwp)::d0=0._iwp,d1=1._iwp,d2=2._iwp,d3=3._iwp,d7=7._iwp,d8=8._iwp,  &
   d10=10._iwp,d16=16._iwp,d17=17._iwp,d20=20._iwp,d27=27._iwp,           &
   d32=32._iwp,d40=40._iwp,d51=51._iwp,d57=57._iwp,d64=64._iwp,           &
   d80=80._iwp,d81=81._iwp,d160=160._iwp,d189=189._iwp,d320=320._iwp
 x1=coord(1,1)
 y1=coord(1,2)
 x4=coord(4,1)
 y4=coord(4,2)
 x7=coord(7,1)
 y7=coord(7,2)
 cf=ym/(-d1+d2*pr)/(d1+pr)/(x1*y4-x1*y7+x4*y7-y1*x4+y1*x7-y4*x7)
!--------------------------------------------------------------------------
  km(1,1)=-d17/d80*(-2*y4**2+4*y4*y7-2*y7**2+2*pr*y4**2-4*pr*y4*y7+       &
    2*pr*y7**2-x4**2+2*x4**2*pr+2*x4*x7-4*x4*x7*pr-x7**2+2*x7**2*pr)*cf
  km(1,2)=-d17/d80*(y4-y7)*(x4-x7)*cf
  km(1,3)=d3/d160*(-34*x4*x7*pr-2*pr*y4**2-34*pr*y4*y7+2*y4**2+34*y4*y7-  &
    36*y7**2+36*pr*y7**2+x4**2+17*x4*x7-18*x7**2-2*x4**2*pr+36*x7**2*pr+  &
    38*pr*y4*y1-38*pr*y7*y1+38*x4*x1*pr-38*x7*x1*pr-38*y4*y1+38*y7*y1-    &
    19*x4*x1+19*x7*x1)*cf
  km(1,4)=d3/d160*(-18*x4*y7-x4*y4+19*y1*x4-19*y1*x7+y4*x7+18*y7*x7-      &
    38*pr*y4*x7+38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+          &
    38*x7*y1*pr)*cf
  km(1,5)=-d3/d160*(-20*x4*x7*pr+2*pr*y4**2-20*pr*y4*y7-2*y4**2+          &
    20*y4*y7-18*y7**2+18*pr*y7**2-x4**2+10*x4*x7-9*x7**2+2*x4**2*pr+      &
    18*x7**2*pr+16*pr*y4*y1-16*pr*y7*y1+16*x4*x1*pr-16*x7*x1*pr-          &
    16*y4*y1+16*y7*y1-8*x4*x1+8*x7*x1)*cf
  km(1,6)=-d3/d160*(-9*x4*y7+x4*y4+8*y1*x4-8*y1*x7-y4*x7+9*y7*x7-         &
    16*pr*y4*x7+16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+          &
    16*x7*y1*pr)*cf
  km(1,7)=d7/d160*(2*y4*y7-2*y4*y1-2*y7**2+2*y7*y1-2*pr*y4*y7+            &
    2*pr*y4*y1+2*pr*y7**2-2*pr*y7*y1-x4*x1+2*x4*x1*pr+x4*x7-2*x4*x7*pr+   &
    x7*x1-2*x7*x1*pr-x7**2+2*x7**2*pr)*cf
  km(1,8)=d7/d160*(2*pr*y4*x1-2*pr*y4*x7-2*pr*y7*x1-x4*y7+2*pr*x4*y7+     &
    y1*x4-2*x4*y1*pr+y7*x7-y1*x7+2*x7*y1*pr)*cf
  km(1,9)=d3/d160*(-2*y4**2+4*y4*y7-2*y7**2+2*pr*y4**2-4*pr*y4*y7+        &
    2*pr*y7**2-x4**2+2*x4**2*pr+2*x4*x7-4*x4*x7*pr-x7**2+2*x7**2*pr)*cf
  km(1,10)=d3/d160*(-y4*x7-x4*y7+x4*y4+y7*x7)*cf
  km(1,11)=km(1,9)
  km(1,12)=km(1,10)
  km(1,13)=-d7/d160*(2*y4**2-2*y4*y7+x4**2-x4*x7-2*x4**2*pr+2*x4*x1*pr+   &
    2*x4*x7*pr+2*pr*y4*y1-2*pr*y7*y1-x4*x1-2*x7*x1*pr-2*y4*y1+2*y7*y1+    &
    x7*x1-2*pr*y4**2+2*pr*y4*y7)*cf
  km(1,14)=-d7/d160*(-x4*y4+y1*x4-y1*x7+y4*x7+2*pr*y4*x1-2*pr*y7*x1-      &
    2*x4*y1*pr+2*x7*y1*pr+2*pr*x4*y7-2*pr*y4*x7)*cf
  km(1,15)=d3/d160*(20*x4*x7*pr-18*pr*y4**2+20*pr*y4*y7+18*y4**2-         &
    20*y4*y7+2*y7**2-2*pr*y7**2+9*x4**2-10*x4*x7+x7**2-18*x4**2*pr-       &
    2*x7**2*pr+16*pr*y4*y1-16*pr*y7*y1+16*x4*x1*pr-16*x7*x1*pr-16*y4*y1+  &
    16*y7*y1-8*x4*x1+8*x7*x1)*cf
  km(1,16)=d3/d160*(x4*y7-9*x4*y4+8*y1*x4-8*y1*x7+9*y4*x7-y7*x7-          &
    16*pr*y4*x7+16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+          &
    16*x7*y1*pr)*cf
  km(1,17)=-d3/d160*(34*x4*x7*pr-36*pr*y4**2+34*pr*y4*y7+36*y4**2-        &
    34*y4*y7-2*y7**2+2*pr*y7**2+18*x4**2-17*x4*x7-x7**2-36*x4**2*pr+      &
    2*x7**2*pr+38*pr*y4*y1-38*pr*y7*y1+38*x4*x1*pr-38*x7*x1*pr-38*y4*y1+  &
    38*y7*y1-19*x4*x1+19*x7*x1)*cf
  km(1,18)=-d3/d160*(-18*x4*y4+19*y1*x4-19*y1*x7+18*y4*x7+38*pr*y4*x1-    &
    38*pr*y7*x1-38*x4*y1*pr+38*x7*y1*pr+38*pr*x4*y7-38*pr*y4*x7-x4*y7+    &
    y7*x7)*cf
  km(1,19)=d0
  km(1,20)=d0
!--------------------------------------------------------------------------  
  km(2,2)=-d17/d80*(-2*x4**2+4*x4*x7-2*x7**2+2*x4**2*pr-4*x4*x7*pr+       &
    2*x7**2*pr-y4**2+2*pr*y4**2+2*y4*y7-4*pr*y4*y7-y7**2+2*pr*y7**2)*cf
  km(2,3)=-d3/d160*(-x4*y7-19*x1*y4+x4*y4+19*x1*y7+18*y4*x7-18*y7*x7-     &
    38*pr*y4*x7+38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+          &
    38*x7*y1*pr)*cf
  km(2,4)=d3/d160*(-34*x4*x7*pr-2*pr*y4**2-34*pr*y4*y7+y4**2+17*y4*y7-    &
    18*y7**2+36*pr*y7**2+2*x4**2+34*x4*x7-36*x7**2-2*x4**2*pr+            &
    36*x7**2*pr+38*pr*y4*y1-38*pr*y7*y1+38*x4*x1*pr-38*x7*x1*pr-          &
    19*y4*y1+19*y7*y1-38*x4*x1+38*x7*x1)*cf
  km(2,5)=d3/d160*(x4*y7-8*x1*y4-x4*y4+8*x1*y7+9*y4*x7-9*y7*x7-           &
    16*pr*y4*x7+16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+          &
    16*x7*y1*pr)*cf
  km(2,6)=-d3/d160*(-20*x4*x7*pr+2*pr*y4**2-20*pr*y4*y7-y4**2+10*y4*y7-   &
    9*y7**2+18*pr*y7**2-2*x4**2+20*x4*x7-18*x7**2+2*x4**2*pr+             &
    18*x7**2*pr+16*pr*y4*y1-16*pr*y7*y1+16*x4*x1*pr-16*x7*x1*pr-8*y4*y1+  &
    8*y7*y1-16*x4*x1+16*x7*x1)*cf
  km(2,7)=-d7/d160*(2*pr*x4*y7-2*x4*y1*pr+2*x7*y1*pr-x1*y4+2*pr*y4*x1+    &
    y4*x7-2*pr*y4*x7+x1*y7-2*pr*y7*x1-y7*x7)*cf
  km(2,8)=d7/d160*(-2*x4*x1+2*x4*x7+2*x7*x1-2*x7**2+2*x4*x1*pr-           &
    2*x4*x7*pr-2*x7*x1*pr+2*x7**2*pr+y4*y7-2*pr*y4*y7-y4*y1+2*pr*y4*y1-   &
    y7**2+2*pr*y7**2+y7*y1-2*pr*y7*y1)*cf
  km(2,9)=km(1,10)
  km(2,10)=d3/d160*(-2*x4**2+4*x4*x7-2*x7**2+2*x4**2*pr-4*x4*x7*pr+       &
    2*x7**2*pr-y4**2+2*pr*y4**2+2*y4*y7-4*pr*y4*y7-y7**2+2*pr*y7**2)*cf
  km(2,11)=km(1,10)
  km(2,12)=km(2,10)
  km(2,13)=d7/d160*(-x4*y7-x1*y4+x4*y4+x1*y7+2*pr*x4*y7+2*pr*y4*x1-       &
    2*pr*y7*x1-2*pr*y4*x7+2*x7*y1*pr-2*x4*y1*pr)*cf
  km(2,14)=-d7/d160*(y7*y1-2*pr*y4**2+2*x7*x1+y4**2-y4*y7+2*x4**2-        &
    2*x4*x7-2*x4**2*pr+2*pr*y4*y1+2*x4*x7*pr+2*x4*x1*pr-2*x7*x1*pr-       &
    y4*y1+2*pr*y4*y7-2*x4*x1-2*pr*y7*y1)*cf
  km(2,15)=-d3/d160*(-9*x4*y7-8*x1*y4+9*x4*y4+8*x1*y7-y4*x7+y7*x7-        &
    16*pr*y4*x7+16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+          &
    16*x7*y1*pr)*cf
  km(2,16)=d3/d160*(20*x4*x7*pr-18*pr*y4**2+20*pr*y4*y7+9*y4**2-          &
    10*y4*y7+y7**2-2*pr*y7**2+18*x4**2-20*x4*x7+2*x7**2-18*x4**2*pr-      &
    2*x7**2*pr+16*pr*y4*y1-16*pr*y7*y1+16*x4*x1*pr-16*x7*x1*pr-8*y4*y1+   &
    8*y7*y1-16*x4*x1+16*x7*x1)*cf
  km(2,17)=d3/d160*(y4*x7-18*x4*y7+18*x4*y4-y7*x7-19*x1*y4+19*x1*y7+      &
    38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*pr*y4*x7+38*x7*y1*pr-          &
    38*x4*y1*pr)*cf
  km(2,18)=-d3/d160*(34*x4*x7*pr-36*pr*y4**2+34*pr*y4*y7+18*y4**2-        &
    17*y4*y7-y7**2+2*pr*y7**2+36*x4**2-34*x4*x7-2*x7**2-36*x4**2*pr+      &
    2*x7**2*pr+38*pr*y4*y1-38*pr*y7*y1+38*x4*x1*pr-38*x7*x1*pr-19*y4*y1+  &
    19*y7*y1-38*x4*x1+38*x7*x1)*cf
  km(2,19)=0
  km(2,20)=0
!--------------------------------------------------------------------------
  km(3,3)=-d27/d32*(-2*x4*x7*pr+2*pr*y4**2-2*pr*y4*y7+2*x1**2*pr+         &
    2*pr*y1**2-x1**2-2*y4**2+2*y4*y7-2*y7**2+2*pr*y7**2-x4**2+x4*x7-      &
    x7**2+2*x4**2*pr+2*x7**2*pr-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-         &
    2*x7*x1*pr+2*y4*y1+2*y7*y1+x4*x1+x7*x1-2*y1**2)*cf
  km(3,4)=-d27/d64*(-x4*y7-x1*y4+2*x4*y4-x1*y7-y1*x4-y1*x7-y4*x7+         &
    2*y7*x7+2*x1*y1)*cf
  km(3,5)=d27/d160*(-8*x4*x7*pr+2*pr*y4**2-8*pr*y4*y7+2*x1**2*pr+         &
    2*pr*y1**2-x1**2-2*y4**2+8*y4*y7-8*y7**2+8*pr*y7**2-x4**2+4*x4*x7-    &
    4*x7**2+2*x4**2*pr+8*x7**2*pr+4*pr*y4*y1-8*pr*y7*y1+4*x4*x1*pr-       &
    8*x7*x1*pr-4*y4*y1+8*y7*y1-2*x4*x1+4*x7*x1-2*y1**2)*cf
  km(3,6)=d27/d320*(-7*x4*y7-x1*y4+2*x4*y4-x1*y7+5*y1*x4-7*y1*x7-y4*x7+   &
    8*y7*x7-12*pr*y4*x7+12*pr*x4*y7+12*pr*y4*x1-12*pr*y7*x1-12*x4*y1*pr+  &
    12*x7*y1*pr+2*x1*y1)*cf
  km(3,7)=-d3/d160*(-16*x4*x7*pr-16*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-       &
    x1**2+16*y4*y7-18*y7**2+18*pr*y7**2+8*x4*x7-9*x7**2+18*x7**2*pr+      &
    16*pr*y4*y1-20*pr*y7*y1+16*x4*x1*pr-20*x7*x1*pr-16*y4*y1+20*y7*y1-    &
    8*x4*x1+10*x7*x1-2*y1**2)*cf
  km(3,8)=-d3/d160*(-8*x4*y7-x1*y7+8*y1*x4-9*y1*x7+9*y7*x7-16*pr*y4*x7+   &
    16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+16*x7*y1*pr+x1*y1)*cf
  km(3,9)=d27/d160*(2*y4**2-2*y4*y7+x4**2-x4*x7-2*x4**2*pr+2*x4*x1*pr+    &
    2*x4*x7*pr+2*pr*y4*y1-2*pr*y7*y1-x4*x1-2*x7*x1*pr-2*y4*y1+2*y7*y1+    &
    x7*x1-2*pr*y4**2+2*pr*y4*y7)*cf
  km(3,10)=d27/d320*(x4*y7+x1*y4-2*x4*y4-x1*y7+y1*x4-y1*x7+y4*x7)*cf
  km(3,11)=km(3,9)
  km(3,12)=km(3,10)
  km(3,13)=d3/d160*(2*pr*y4**2+2*x1**2*pr+2*pr*y1**2-x1**2-2*y4**2-       &
    x4**2+2*x4**2*pr-4*pr*y4*y1-4*x4*x1*pr+4*y4*y1+2*x4*x1-2*y1**2)*cf
  km(3,14)=d3/d160*(-x1*y4+x4*y4-y1*x4+x1*y1)*cf
  km(3,15)=-d27/d160*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-x1**2-  &
    2*y4*y7-x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+2*y4*y1+    &
    2*y7*y1+x4*x1+x7*x1-2*y1**2)*cf
  km(3,16)=-d27/d320*(x4*y7-x1*y4-x1*y7-y1*x4-y1*x7+y4*x7+2*x1*y1)*cf
  km(3,17)=d27/d32*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-x1**2-    &
    2*y4*y7-x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+2*y4*y1+    &
    2*y7*y1+x4*x1+x7*x1-2*y1**2)*cf
  km(3,18)=d27/d64*(x4*y7-x1*y4-x1*y7-y1*x4-y1*x7+y4*x7+2*x1*y1)*cf
  km(3,19)=-d81/d80*(2*y4**2-2*y4*y7+x4**2-x4*x7-2*x4**2*pr+2*x4*x1*pr+   &
    2*x4*x7*pr+2*pr*y4*y1-2*pr*y7*y1-x4*x1-2*x7*x1*pr-2*y4*y1+2*y7*y1+    &
    x7*x1-2*pr*y4**2+2*pr*y4*y7)*cf
  km(3,20)=-d81/d160*(x4*y7+x1*y4-2*x4*y4-x1*y7+y1*x4-y1*x7+y4*x7)*cf
!--------------------------------------------------------------------------
  km(4,4)=-d27/d32*(-2*x4*x7*pr+2*pr*y4**2-2*pr*y4*y7+2*x1**2*pr+         &
    2*pr*y1**2-2*x1**2-y4**2+y4*y7-y7**2+2*pr*y7**2-2*x4**2+2*x4*x7-      &
    2*x7**2+2*x4**2*pr+2*x7**2*pr-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-       &
    2*x7*x1*pr+y4*y1+y7*y1+2*x4*x1+2*x7*x1-y1**2)*cf
  km(4,5)=-d27/d320*(x4*y7-5*x1*y4-2*x4*y4+7*x1*y7+y1*x4+y1*x7+7*y4*x7-   &
    8*y7*x7-12*pr*y4*x7+12*pr*x4*y7+12*pr*y4*x1-12*pr*y7*x1-12*x4*y1*pr+  &
    12*x7*y1*pr-2*x1*y1)*cf
  km(4,6)=d27/d160*(-8*x4*x7*pr+2*pr*y4**2-8*pr*y4*y7+2*x1**2*pr+         &
    2*pr*y1**2-2*x1**2-y4**2+4*y4*y7-4*y7**2+8*pr*y7**2-2*x4**2+8*x4*x7-  &
    8*x7**2+2*x4**2*pr+8*x7**2*pr+4*pr*y4*y1-8*pr*y7*y1+4*x4*x1*pr-       &
    8*x7*x1*pr-2*y4*y1+4*y7*y1-4*x4*x1+8*x7*x1-y1**2)*cf
  km(4,7)=d3/d160*(-8*x1*y4+9*x1*y7+y1*x7+8*y4*x7-9*y7*x7-16*pr*y4*x7+    &
    16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+16*x7*y1*pr-x1*y1)*cf
  km(4,8)=-d3/d160*(-16*x4*x7*pr-16*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-       &
    2*x1**2+8*y4*y7-9*y7**2+18*pr*y7**2+16*x4*x7-18*x7**2+18*x7**2*pr+    &
    16*pr*y4*y1-20*pr*y7*y1+16*x4*x1*pr-20*x7*x1*pr-8*y4*y1+10*y7*y1-     &
    16*x4*x1+20*x7*x1-y1**2)*cf
  km(4,9)=km(3,10)
  km(4,10)=d27/d160*(y7*y1-2*pr*y4**2+2*x7*x1+y4**2-y4*y7+2*x4**2-        &
    2*x4*x7-2*x4**2*pr+2*pr*y4*y1+2*x4*x7*pr+2*x4*x1*pr-2*x7*x1*pr-       &
    y4*y1+2*pr*y4*y7-2*x4*x1-2*pr*y7*y1)*cf
  km(4,11)=km(3,10)
  km(4,12)=km(4,10)
  km(4,13)=km(3,14)
  km(4,14)=d3/d160*(2*pr*y4**2+2*x1**2*pr+2*pr*y1**2-2*x1**2-y4**2-       &
    2*x4**2+2*x4**2*pr-4*pr*y4*y1-4*x4*x1*pr+2*y4*y1+4*x4*x1-y1**2)*cf
  km(4,15)=km(3,16)
  km(4,16)=-d27/d160*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-        &
    2*x1**2-y4*y7-2*x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+    &
    y4*y1+y7*y1+2*x4*x1+2*x7*x1-y1**2)*cf
  km(4,17)=km(3,18)
  km(4,18)=d27/d32*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-2*x1**2-  &
    y4*y7-2*x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+y4*y1+      &
    y7*y1+2*x4*x1+2*x7*x1-y1**2)*cf
  km(4,19)=km(3,20)
  km(4,20)=-d81/d80*(y7*y1-2*pr*y4**2+2*x7*x1+y4**2-y4*y7+2*x4**2-        &
    2*x4*x7-2*x4**2*pr+2*pr*y4*y1+2*x4*x7*pr+2*x4*x1*pr-2*x7*x1*pr-       &
    y4*y1+2*pr*y4*y7-2*x4*x1-2*pr*y7*y1)*cf
!--------------------------------------------------------------------------
  km(5,5)=km(3,3)
  km(5,6)=km(3,4)
  km(5,7)=-d3/d160*(38*x4*x7*pr+38*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-x1**2-  &
    38*y4*y7+36*y7**2-36*pr*y7**2-19*x4*x7+18*x7**2-36*x7**2*pr-          &
    38*pr*y4*y1+34*pr*y7*y1-38*x4*x1*pr+34*x7*x1*pr+38*y4*y1-34*y7*y1+    &
    19*x4*x1-17*x7*x1-2*y1**2)*cf
  km(5,8)=d3/d160*(-19*x4*y7+x1*y7+19*y1*x4-18*y1*x7+18*y7*x7-            &
    38*pr*y4*x7+38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+          &
    38*x7*y1*pr-x1*y1)*cf
  km(5,9)=-d27/d32*(2*y4**2-2*y4*y7+x4**2-x4*x7-2*x4**2*pr+2*x4*x1*pr+    &
    2*x4*x7*pr+2*pr*y4*y1-2*pr*y7*y1-x4*x1-2*x7*x1*pr-2*y4*y1+2*y7*y1+    &
    x7*x1-2*pr*y4**2+2*pr*y4*y7)*cf
  km(5,10)=-d27/d64*(x4*y7+x1*y4-2*x4*y4-x1*y7+y1*x4-y1*x7+y4*x7)*cf
  km(5,11)=km(3,9)
  km(5,12)=km(3,10)
  km(5,13)=km(3,13)
  km(5,14)=km(3,14)
  km(5,15)=km(3,15)
  km(5,16)=km(3,16)
  km(5,17)=km(3,15)
  km(5,18)=km(3,16)
  km(5,19)=d81/d80*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-x1**2-    &
    2*y4*y7-x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+2*y4*y1+    &
    2*y7*y1+x4*x1+x7*x1-2*y1**2)*cf
  km(5,20)=d81/d160*(x4*y7-x1*y4-x1*y7-y1*x4-y1*x7+y4*x7+2*x1*y1)*cf
!--------------------------------------------------------------------------
  km(6,6)=km(4,4)
  km(6,7)=-d3/d160*(-19*x1*y4+18*x1*y7-y1*x7+19*y4*x7-18*y7*x7-           &
    38*pr*y4*x7+38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+          &
    38*x7*y1*pr+x1*y1)*cf
  km(6,8)=-d3/d160*(38*x4*x7*pr+38*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-        &
    2*x1**2-19*y4*y7+18*y7**2-36*pr*y7**2-38*x4*x7+36*x7**2-36*x7**2*pr-  &
    38*pr*y4*y1+34*pr*y7*y1-38*x4*x1*pr+34*x7*x1*pr+19*y4*y1-17*y7*y1+    &
    38*x4*x1-34*x7*x1-y1**2)*cf
  km(6,9)=km(5,10)
  km(6,10)=-d27/d32*(y7*y1-2*pr*y4**2+2*x7*x1+y4**2-y4*y7+2*x4**2-        &
    2*x4*x7-2*x4**2*pr+2*pr*y4*y1+2*x4*x7*pr+2*x4*x1*pr-2*x7*x1*pr-       &
    y4*y1+2*pr*y4*y7-2*x4*x1-2*pr*y7*y1)*cf
  km(6,11)=km(3,10)
  km(6,12)=km(4,10)
  km(6,13)=km(3,14)
  km(6,14)=km(4,14)
  km(6,15)=km(3,16)
  km(6,16)=km(4,16)
  km(6,17)=km(3,16)
  km(6,18)=km(4,16)
  km(6,19)=km(5,20)
  km(6,20)=d81/d80*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-2*x1**2-  &
    y4*y7-2*x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+y4*y1+      &
    y7*y1+2*x4*x1+2*x7*x1-y1**2)*cf
!--------------------------------------------------------------------------
  km(7,7)=-d17/d80*(-2*y7**2+4*y7*y1-2*y1**2+2*pr*y7**2-4*pr*y7*y1+       &
    2*pr*y1**2-x1**2+2*x1**2*pr+2*x7*x1-4*x7*x1*pr-x7**2+2*x7**2*pr)*cf
  km(7,8)=-d17/d80*(-y7+y1)*(x1-x7)*cf
  km(7,9)=d3/d160*(38*x4*x7*pr+38*pr*y4*y7+36*x1**2*pr+36*pr*y1**2-       &
    18*x1**2-38*y4*y7+2*y7**2-2*pr*y7**2-19*x4*x7+x7**2-2*x7**2*pr-       &
    38*pr*y4*y1-34*pr*y7*y1-38*x4*x1*pr-34*x7*x1*pr+38*y4*y1+34*y7*y1+    &
    19*x4*x1+17*x7*x1-36*y1**2)*cf
  km(7,10)=d3/d160*(-19*x1*y4+x1*y7-18*y1*x7+19*y4*x7-y7*x7-38*pr*y4*x7+  &
    38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+38*x7*y1*pr+          &
    18*x1*y1)*cf
  km(7,11)=-d3/d160*(16*x4*x7*pr+16*pr*y4*y7+18*x1**2*pr+18*pr*y1**2-     &
    9*x1**2-16*y4*y7-2*y7**2+2*pr*y7**2-8*x4*x7-x7**2+2*x7**2*pr-         &
    16*pr*y4*y1-20*pr*y7*y1-16*x4*x1*pr-20*x7*x1*pr+16*y4*y1+20*y7*y1+    &
    8*x4*x1+10*x7*x1-18*y1**2)*cf
  km(7,12)=-d3/d160*(-8*x1*y4-x1*y7-9*y1*x7+8*y4*x7+y7*x7-16*pr*y4*x7+    &
    16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+16*x7*y1*pr+          &
    9*x1*y1)*cf
  km(7,13)=d7/d160*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-x1**2-    &
    2*y4*y7-x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+2*y4*y1+    &
    2*y7*y1+x4*x1+x7*x1-2*y1**2)*cf
  km(7,14)=d7/d160*(y4*x7-2*pr*y4*x7+2*pr*x4*y7+2*pr*y4*x1-2*pr*y7*x1-    &
    2*x4*y1*pr+2*x7*y1*pr+x1*y1-y1*x7-x1*y4)*cf
  km(7,15)=d3/d160*(-2*y7**2+4*y7*y1-2*y1**2+2*pr*y7**2-4*pr*y7*y1+       &
    2*pr*y1**2-x1**2+2*x1**2*pr+2*x7*x1-4*x7*x1*pr-x7**2+2*x7**2*pr)*cf
  km(7,16)=d3/d160*(x1*y1-y1*x7-x1*y7+y7*x7)*cf
  km(7,17)=km(7,15)
  km(7,18)=km(7,16)
  km(7,19)=d0
  km(7,20)=d0
!--------------------------------------------------------------------------
  km(8,8)=-d17/d80*(-2*x1**2+4*x7*x1-2*x7**2+2*x1**2*pr-4*x7*x1*pr+       &
    2*x7**2*pr-y7**2+2*pr*y7**2+2*y7*y1-4*pr*y7*y1-y1**2+2*pr*y1**2)*cf
  km(8,9)=-d3/d160*(-19*x4*y7+18*x1*y7+19*y1*x4-y1*x7+y7*x7-38*pr*y4*x7+  &
    38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+38*x7*y1*pr-          &
    18*x1*y1)*cf
  km(8,10)=d3/d160*(38*x4*x7*pr+38*pr*y4*y7+36*x1**2*pr+36*pr*y1**2-      &
    36*x1**2-19*y4*y7+y7**2-2*pr*y7**2-38*x4*x7+2*x7**2-2*x7**2*pr-       &
    38*pr*y4*y1-34*pr*y7*y1-38*x4*x1*pr-34*x7*x1*pr+19*y4*y1+17*y7*y1+    &
    38*x4*x1+34*x7*x1-18*y1**2)*cf
  km(8,11)=d3/d160*(-8*x4*y7+9*x1*y7+8*y1*x4+y1*x7-y7*x7-16*pr*y4*x7+     &
    16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+16*x7*y1*pr-          &
    9*x1*y1)*cf
  km(8,12)=-d3/d160*(16*x4*x7*pr+16*pr*y4*y7+18*x1**2*pr+18*pr*y1**2-     &
    18*x1**2-8*y4*y7-y7**2+2*pr*y7**2-16*x4*x7-2*x7**2+2*x7**2*pr-        &
    16*pr*y4*y1-20*pr*y7*y1-16*x4*x1*pr-20*x7*x1*pr+8*y4*y1+10*y7*y1+     &
    16*x4*x1+20*x7*x1-9*y1**2)*cf
  km(8,13)=-d7/d160*(2*pr*y4*x1-x4*y7+2*pr*x4*y7+2*x7*y1*pr-2*pr*y4*x7-   &
    2*x4*y1*pr-2*pr*y7*x1-x1*y1+x1*y7+y1*x4)*cf
  km(8,14)=d7/d160*(2*x4*x7*pr+2*pr*y4*y7+2*x1**2*pr+2*pr*y1**2-2*x1**2-  &
    y4*y7-2*x4*x7-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-2*x7*x1*pr+y4*y1+      &
    y7*y1+2*x4*x1+2*x7*x1-y1**2)*cf
  km(8,15)=km(7,16)
  km(8,16)=d3/d160*(-2*x1**2+4*x7*x1-2*x7**2+2*x1**2*pr-4*x7*x1*pr+       &
    2*x7**2*pr-y7**2+2*pr*y7**2+2*y7*y1-4*pr*y7*y1-y1**2+2*pr*y1**2)*cf
  km(8,17)=km(7,16)
  km(8,18)=km(8,16)
  km(8,19)=d0
  km(8,20)=d0
!--------------------------------------------------------------------------
  km(9,9)=km(3,3)
  km(9,10)=km(3,4)
  km(9,11)=d27/d160*(4*x4*x7*pr+2*pr*y4**2+4*pr*y4*y7+8*x1**2*pr+         &
    8*pr*y1**2-4*x1**2-2*y4**2-4*y4*y7-2*y7**2+2*pr*y7**2-x4**2-2*x4*x7-  &
    x7**2+2*x4**2*pr+2*x7**2*pr-8*pr*y4*y1-8*pr*y7*y1-8*x4*x1*pr-         &
    8*x7*x1*pr+8*y4*y1+8*y7*y1+4*x4*x1+4*x7*x1-8*y1**2)*cf
  km(9,12)=d27/d320*(-x4*y7-7*x1*y4+2*x4*y4-x1*y7-y1*x4-7*y1*x7+5*y4*x7+  &
    2*y7*x7-12*pr*y4*x7+12*pr*x4*y7+12*pr*y4*x1-12*pr*y7*x1-12*x4*y1*pr+  &
    12*x7*y1*pr+8*x1*y1)*cf
  km(9,13)=-d3/d160*(16*x4*x7*pr+2*pr*y4**2+16*pr*y4*y7+18*x1**2*pr+      &
    18*pr*y1**2-9*x1**2-2*y4**2-16*y4*y7-x4**2-8*x4*x7+2*x4**2*pr-        &
    20*pr*y4*y1-16*pr*y7*y1-20*x4*x1*pr-16*x7*x1*pr+20*y4*y1+16*y7*y1+    &
    10*x4*x1+8*x7*x1-18*y1**2)*cf
  km(9,14)=-d3/d160*(-9*x1*y4+x4*y4-y1*x4-8*y1*x7+8*y4*x7-16*pr*y4*x7+    &
    16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+16*x7*y1*pr+          &
    9*x1*y1)*cf
  km(9,15)=-d27/d160*(2*y4*y7-2*y4*y1-2*y7**2+2*y7*y1-2*pr*y4*y7+         &
    2*pr*y4*y1+2*pr*y7**2-2*pr*y7*y1-x4*x1+2*x4*x1*pr+x4*x7-2*x4*x7*pr+   &
    x7*x1-2*x7*x1*pr-x7**2+2*x7**2*pr)*cf
  km(9,16)=-d27/d320*(-x4*y7+x1*y4-x1*y7+y1*x4-y1*x7-y4*x7+2*y7*x7)*cf
  km(9,17)=km(9,15)
  km(9,18)=km(9,16)
  km(9,19)=d81/d80*(2*y4*y7-2*y4*y1-2*y7**2+2*y7*y1-2*pr*y4*y7+           &
    2*pr*y4*y1+2*pr*y7**2-2*pr*y7*y1-x4*x1+2*x4*x1*pr+x4*x7-2*x4*x7*pr+   &
    x7*x1-2*x7*x1*pr-x7**2+2*x7**2*pr)*cf
  km(9,20)=d81/d160*(-x4*y7+x1*y4-x1*y7+y1*x4-y1*x7-y4*x7+2*y7*x7)*cf
!--------------------------------------------------------------------------
  km(10,10)=km(4,4)
  km(10,11)=-d27/d320*(-5*x4*y7+x1*y4-2*x4*y4+7*x1*y7+7*y1*x4+y1*x7+      &
    y4*x7-2*y7*x7-12*pr*y4*x7+12*pr*x4*y7+12*pr*y4*x1-12*pr*y7*x1-        &
    12*x4*y1*pr+12*x7*y1*pr-8*x1*y1)*cf
  km(10,12)=d27/d160*(4*x4*x7*pr+2*pr*y4**2+4*pr*y4*y7+8*x1**2*pr+        &
    8*pr*y1**2-8*x1**2-y4**2-2*y4*y7-y7**2+2*pr*y7**2-2*x4**2-4*x4*x7-    &
    2*x7**2+2*x4**2*pr+2*x7**2*pr-8*pr*y4*y1-8*pr*y7*y1-8*x4*x1*pr-       &
    8*x7*x1*pr+4*y4*y1+4*y7*y1+8*x4*x1+8*x7*x1-4*y1**2)*cf
  km(10,13)=d3/d160*(-8*x4*y7+x1*y4-x4*y4+8*x1*y7+9*y1*x4-16*pr*y4*x7+    &
    16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+16*x7*y1*pr-          &
    9*x1*y1)*cf
  km(10,14)=-d3/d160*(16*x4*x7*pr+2*pr*y4**2+16*pr*y4*y7+18*x1**2*pr+     &
    18*pr*y1**2-18*x1**2-y4**2-8*y4*y7-2*x4**2-16*x4*x7+2*x4**2*pr-       &
    20*pr*y4*y1-16*pr*y7*y1-20*x4*x1*pr-16*x7*x1*pr+10*y4*y1+8*y7*y1+     &
    20*x4*x1+16*x7*x1-9*y1**2)*cf
  km(10,15)=km(9,16)
  km(10,16)=-d27/d160*(-2*x4*x1+2*x4*x7+2*x7*x1-2*x7**2+2*x4*x1*pr-       &
    2*x4*x7*pr-2*x7*x1*pr+2*x7**2*pr+y4*y7-2*pr*y4*y7-y4*y1+2*pr*y4*y1-   &
    y7**2+2*pr*y7**2+y7*y1-2*pr*y7*y1)*cf
  km(10,17)=km(9,16)
  km(10,18)=km(10,16)
  km(10,19)=km(9,20)
  km(10,20)=d81/d80*(-2*x4*x1+2*x4*x7+2*x7*x1-2*x7**2+2*x4*x1*pr-         &
    2*x4*x7*pr-2*x7*x1*pr+2*x7**2*pr+y4*y7-2*pr*y4*y7-y4*y1+2*pr*y4*y1-   &
    y7**2+2*pr*y7**2+y7*y1-2*pr*y7*y1)*cf
!--------------------------------------------------------------------------
  km(11,11)=km(3,3)
  km(11,12)=km(3,4)
  km(11,13)=d3/d160*(38*x4*x7*pr-2*pr*y4**2+38*pr*y4*y7+36*x1**2*pr+      &
    36*pr*y1**2-18*x1**2+2*y4**2-38*y4*y7+x4**2-19*x4*x7-2*x4**2*pr-      &
    34*pr*y4*y1-38*pr*y7*y1-34*x4*x1*pr-38*x7*x1*pr+34*y4*y1+38*y7*y1+    &
    17*x4*x1+19*x7*x1-36*y1**2)*cf
  km(11,14)=d3/d160*(-18*x1*y4-x4*y4+y1*x4-19*y1*x7+19*y4*x7-             &
    38*pr*y4*x7+38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+          &
    38*x7*y1*pr+18*x1*y1)*cf
  km(11,15)=d27/d32*(2*y4*y7-2*y4*y1-2*y7**2+2*y7*y1-2*pr*y4*y7+          &
    2*pr*y4*y1+2*pr*y7**2-2*pr*y7*y1-x4*x1+2*x4*x1*pr+x4*x7-2*x4*x7*pr+   &
    x7*x1-2*x7*x1*pr-x7**2+2*x7**2*pr)*cf
  km(11,16)=d27/d64*(-x4*y7+x1*y4-x1*y7+y1*x4-y1*x7-y4*x7+2*y7*x7)*cf
  km(11,17)=km(9,15)
  km(11,18)=km(9,16)
  km(11,19)=km(3,19)
  km(11,20)=km(3,20)
!--------------------------------------------------------------------------
  km(12,12)=km(4,4)
  km(12,13)=-d3/d160*(-19*x4*y7-x1*y4+x4*y4+19*x1*y7+18*y1*x4-            &
    38*pr*y4*x7+38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+          &
    38*x7*y1*pr-18*x1*y1)*cf
  km(12,14)=d3/d160*(38*x4*x7*pr-2*pr*y4**2+38*pr*y4*y7+36*x1**2*pr+      &
    36*pr*y1**2-36*x1**2+y4**2-19*y4*y7+2*x4**2-38*x4*x7-2*x4**2*pr-      &
    34*pr*y4*y1-38*pr*y7*y1-34*x4*x1*pr-38*x7*x1*pr+17*y4*y1+19*y7*y1+    &
    34*x4*x1+38*x7*x1-18*y1**2)*cf
  km(12,15)=km(11,16)
  km(12,16)=d27/d32*(-2*x4*x1+2*x4*x7+2*x7*x1-2*x7**2+2*x4*x1*pr-         &
    2*x4*x7*pr-2*x7*x1*pr+2*x7**2*pr+y4*y7-2*pr*y4*y7-y4*y1+2*pr*y4*y1-   &
    y7**2+2*pr*y7**2+y7*y1-2*pr*y7*y1)*cf
  km(12,17)=km(9,16)
  km(12,18)=km(10,16)
  km(12,19)=km(3,20)
  km(12,20)=km(4,20)
!--------------------------------------------------------------------------
  km(13,13)=-d17/d80*(2*pr*y4**2+2*x1**2*pr+2*pr*y1**2-x1**2-2*y4**2-     &
    x4**2+2*x4**2*pr-4*pr*y4*y1-4*x4*x1*pr+4*y4*y1+2*x4*x1-2*y1**2)*cf
  km(13,14)=-d17/d80*(y1-y4)*(x1-x4)*cf
  km(13,15)=-d3/d160*(38*x4*x7*pr-36*pr*y4**2+38*pr*y4*y7+2*x1**2*pr+     &
    2*pr*y1**2-x1**2+36*y4**2-38*y4*y7+18*x4**2-19*x4*x7-36*x4**2*pr+     &
    34*pr*y4*y1-38*pr*y7*y1+34*x4*x1*pr-38*x7*x1*pr-34*y4*y1+38*y7*y1-    &
    17*x4*x1+19*x7*x1-2*y1**2)*cf
  km(13,16)=d3/d160*(-18*x1*y4+18*x4*y4+y1*x4-x1*y1-19*x4*y7+19*x1*y7+    &
    38*pr*x4*y7+38*pr*y4*x1-38*pr*y7*x1-38*pr*y4*x7+38*x7*y1*pr-          &
    38*x4*y1*pr)*cf
  km(13,17)=-d3/d160*(-16*x4*x7*pr+18*pr*y4**2-16*pr*y4*y7+2*x1**2*pr+    &
    2*pr*y1**2-x1**2-18*y4**2+16*y4*y7-9*x4**2+8*x4*x7+18*x4**2*pr-       &
    20*pr*y4*y1+16*pr*y7*y1-20*x4*x1*pr+16*x7*x1*pr+20*y4*y1-16*y7*y1+    &
    10*x4*x1-8*x7*x1-2*y1**2)*cf
  km(13,18)=-d3/d160*(-8*x4*y7-9*x1*y4+9*x4*y4+8*x1*y7-y1*x4-             &
    16*pr*y4*x7+16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+          &
    16*x7*y1*pr+x1*y1)*cf
  km(13,19)=d0
  km(13,20)=d0
!--------------------------------------------------------------------------
  km(14,14)=-d17/d80*(2*pr*y4**2+2*x1**2*pr+2*pr*y1**2-2*x1**2-y4**2-     &
    2*x4**2+2*x4**2*pr-4*pr*y4*y1-4*x4*x1*pr+2*y4*y1+4*x4*x1-y1**2)*cf
  km(14,15)=-d3/d160*(-x1*y4-18*x4*y4+18*y1*x4+x1*y1-19*y1*x7+19*y4*x7+   &
    38*pr*y4*x1-38*pr*y7*x1-38*x4*y1*pr+38*x7*y1*pr+38*pr*x4*y7-          &
    38*pr*y4*x7)*cf
  km(14,16)=-d3/d160*(38*x4*x7*pr-36*pr*y4**2+38*pr*y4*y7+2*x1**2*pr+     &
    2*pr*y1**2-2*x1**2+18*y4**2-19*y4*y7+36*x4**2-38*x4*x7-36*x4**2*pr+   &
    34*pr*y4*y1-38*pr*y7*y1+34*x4*x1*pr-38*x7*x1*pr-17*y4*y1+19*y7*y1-    &
    34*x4*x1+38*x7*x1-y1**2)*cf
  km(14,17)=d3/d160*(x1*y4-9*x4*y4+9*y1*x4-8*y1*x7+8*y4*x7-16*pr*y4*x7+   &
    16*pr*x4*y7+16*pr*y4*x1-16*pr*y7*x1-16*x4*y1*pr+16*x7*y1*pr-x1*y1)*cf
  km(14,18)=-d3/d160*(-16*x4*x7*pr+18*pr*y4**2-16*pr*y4*y7+2*x1**2*pr+    &
    2*pr*y1**2-2*x1**2-9*y4**2+8*y4*y7-18*x4**2+16*x4*x7+18*x4**2*pr-     &
    20*pr*y4*y1+16*pr*y7*y1-20*x4*x1*pr+16*x7*x1*pr+10*y4*y1-8*y7*y1+     &
    20*x4*x1-16*x7*x1-y1**2)*cf
  km(14,19)=d0
  km(14,20)=d0
!--------------------------------------------------------------------------
  km(15,15)=km(3,3)
  km(15,16)=km(3,4)
  km(15,17)=d27/d160*(-8*x4*x7*pr+8*pr*y4**2-8*pr*y4*y7+2*x1**2*pr+       &
    2*pr*y1**2-x1**2-8*y4**2+8*y4*y7-2*y7**2+2*pr*y7**2-4*x4**2+4*x4*x7-  &
    x7**2+8*x4**2*pr+2*x7**2*pr-8*pr*y4*y1+4*pr*y7*y1-8*x4*x1*pr+         &
    4*x7*x1*pr+8*y4*y1-4*y7*y1+4*x4*x1-2*x7*x1-2*y1**2)*cf
  km(15,18)=d27/d320*(-7*x4*y7-7*x1*y4+8*x4*y4+5*x1*y7-y1*x4-y1*x7-       &
    y4*x7+2*y7*x7-12*pr*y4*x7+12*pr*x4*y7+12*pr*y4*x1-12*pr*y7*x1-        &
    12*x4*y1*pr+12*x7*y1*pr+2*x1*y1)*cf
  km(15,19)=km(5,19)
  km(15,20)=km(5,20)
!--------------------------------------------------------------------------
  km(16,16)=km(4,4)
  km(16,17)=-d27/d320*(x4*y7+x1*y4-8*x4*y4+x1*y7+7*y1*x4-5*y1*x7+         &
    7*y4*x7-2*y7*x7-12*pr*y4*x7+12*pr*x4*y7+12*pr*y4*x1-12*pr*y7*x1-      &
    12*x4*y1*pr+12*x7*y1*pr-2*x1*y1)*cf
  km(16,18)=d27/d160*(-8*x4*x7*pr+8*pr*y4**2-8*pr*y4*y7+2*x1**2*pr+       &
    2*pr*y1**2-2*x1**2-4*y4**2+4*y4*y7-y7**2+2*pr*y7**2-8*x4**2+8*x4*x7-  &
    2*x7**2+8*x4**2*pr+2*x7**2*pr-8*pr*y4*y1+4*pr*y7*y1-8*x4*x1*pr+       &
    4*x7*x1*pr+4*y4*y1-2*y7*y1+8*x4*x1-4*x7*x1-y1**2)*cf
  km(16,19)=km(5,20)
  km(16,20)=km(6,20)
!--------------------------------------------------------------------------
  km(17,17)=km(3,3)
  km(17,18)=km(3,4)
  km(17,19)=km(9,19)
  km(17,20)=km(9,20)
!--------------------------------------------------------------------------
  km(18,18)=km(4,4)
  km(18,19)=km(9,20)
  km(18,20)=km(10,20)
!--------------------------------------------------------------------------
  km(19,19)=-d81/d40*(-2*x4*x7*pr+2*pr*y4**2-2*pr*y4*y7+2*x1**2*pr+       &
    2*pr*y1**2-x1**2-2*y4**2+2*y4*y7-2*y7**2+2*pr*y7**2-x4**2+x4*x7-      &
    x7**2+2*x4**2*pr+2*x7**2*pr-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-         &
    2*x7*x1*pr+2*y4*y1+2*y7*y1+x4*x1+x7*x1-2*y1**2)*cf
  km(19,20)=-d81/d80*(-x4*y7-x1*y4+2*x4*y4-x1*y7-y1*x4-y1*x7-y4*x7+       &
    2*y7*x7+2*x1*y1)*cf
!--------------------------------------------------------------------------
  km(20,20)=-d81/d40*(-2*x4*x7*pr+2*pr*y4**2-2*pr*y4*y7+2*x1**2*pr+       &
    2*pr*y1**2-2*x1**2-y4**2+y4*y7-y7**2+2*pr*y7**2-2*x4**2+2*x4*x7-      &
    2*x7**2+2*x4**2*pr+2*x7**2*pr-2*pr*y4*y1-2*pr*y7*y1-2*x4*x1*pr-       &
    2*x7*x1*pr+y4*y1+y7*y1+2*x4*x1+2*x7*x1-y1**2)*cf
!-----------------------------------LOWER TRIANGLE-------------------------  
  km(2,1)=km(1,2)
  km(3,1)=km(1,3)
  km(3,2)=km(2,3)
  km(4,1)=km(1,4)
  km(4,2)=km(2,4)
  km(4,3)=km(3,4)
  km(5,1)=km(1,5)
  km(5,2)=km(2,5)
  km(5,3)=km(3,5)
  km(5,4)=km(4,5)
  km(6,1)=km(1,6)
  km(6,2)=km(2,6)
  km(6,3)=km(3,6)
  km(6,4)=km(4,6)
  km(6,5)=km(5,6)
  km(7,1)=km(1,7)
  km(7,2)=km(2,7)
  km(7,3)=km(3,7)
  km(7,4)=km(4,7)
  km(7,5)=km(5,7)
  km(7,6)=km(6,7)
  km(8,1)=km(1,8)
  km(8,2)=km(2,8) 
  km(8,3)=km(3,8)
  km(8,4)=km(4,8)
  km(8,5)=km(5,8)
  km(8,6)=km(6,8)
  km(8,7)=km(7,8)
  km(9,1)=km(1,9)
  km(9,2)=km(2,9)
  km(9,3)=km(3,9)
  km(9,4)=km(4,9)
  km(9,5)=km(5,9)
  km(9,6)=km(6,9)
  km(9,7)=km(7,9)
  km(9,8)=km(8,9)
  km(10,1)=km(1,10)
  km(10,2)=km(2,10)
  km(10,3)=km(3,10)
  km(10,4)=km(4,10)
  km(10,5)=km(5,10)
  km(10,6)=km(6,10)
  km(10,7)=km(7,10)
  km(10,8)=km(8,10)
  km(10,9)=km(9,10)
  km(11,1)=km(1,11)
  km(11,2)=km(2,11)
  km(11,3)=km(3,11)
  km(11,4)=km(4,11)
  km(11,5)=km(5,11)
  km(11,6)=km(6,11)
  km(11,7)=km(7,11)
  km(11,8)=km(8,11)
  km(11,9)=km(9,11)
  km(11,10)=km(10,11)
  km(12,1)=km(1,12)
  km(12,2)=km(2,12)
  km(12,3)=km(3,12)
  km(12,4)=km(4,12)
  km(12,5)=km(5,12)
  km(12,6)=km(6,12)
  km(12,7)=km(7,12)
  km(12,8)=km(8,12)
  km(12,9)=km(9,12)
  km(12,10)=km(10,12)
  km(12,11)=km(11,12)
  km(13,1)=km(1,13)
  km(13,2)=km(2,13)
  km(13,3)=km(3,13)
  km(13,4)=km(4,13)
  km(13,5)=km(5,13)
  km(13,6)=km(6,13)
  km(13,7)=km(7,13)
  km(13,8)=km(8,13)
  km(13,9)=km(9,13)
  km(13,10)=km(10,13)
  km(13,11)=km(11,13)
  km(13,12)=km(12,13)
  km(14,1)=km(1,14)
  km(14,2)=km(2,14)
  km(14,3)=km(3,14)
  km(14,4)=km(4,14)
  km(14,5)=km(5,14)
  km(14,6)=km(6,14)
  km(14,7)=km(7,14)
  km(14,8)=km(8,14)
  km(14,9)=km(9,14)
  km(14,10)=km(10,14)
  km(14,11)=km(11,14)
  km(14,12)=km(12,14)
  km(14,13)=km(13,14)
  km(15,1)=km(1,15)
  km(15,2)=km(2,15)
  km(15,3)=km(3,15)
  km(15,4)=km(4,15)
  km(15,5)=km(5,15)
  km(15,6)=km(6,15)
  km(15,7)=km(7,15)
  km(15,8)=km(8,15)
  km(15,9)=km(9,15)
  km(15,10)=km(10,15)
  km(15,11)=km(11,15)
  km(15,12)=km(12,15)
  km(15,13)=km(13,15)
  km(15,14)=km(14,15)
  km(16,1)=km(1,16)
  km(16,2)=km(2,16)
  km(16,3)=km(3,16)
  km(16,4)=km(4,16)
  km(16,5)=km(5,16)
  km(16,6)=km(6,16)
  km(16,7)=km(7,16)
  km(16,8)=km(8,16)
  km(16,9)=km(9,16)
  km(16,10)=km(10,16)
  km(16,11)=km(11,16)
  km(16,12)=km(12,16)
  km(16,13)=km(13,16)
  km(16,14)=km(14,16)
  km(16,15)=km(15,16)
  km(17,1)=km(1,17)
  km(17,2)=km(2,17)
  km(17,3)=km(3,17)
  km(17,4)=km(4,17)
  km(17,5)=km(5,17)
  km(17,6)=km(6,17)
  km(17,7)=km(7,17)
  km(17,8)=km(8,17)
  km(17,9)=km(9,17)
  km(17,10)=km(10,17)
  km(17,11)=km(11,17)
  km(17,12)=km(12,17)
  km(17,13)=km(13,17)
  km(17,14)=km(14,17)
  km(17,15)=km(15,17)
  km(17,16)=km(16,17)
  km(18,1)=km(1,18)
  km(18,2)=km(2,18)
  km(18,3)=km(3,18)
  km(18,4)=km(4,18)
  km(18,5)=km(5,18)
  km(18,6)=km(6,18)
  km(18,7)=km(7,18)
  km(18,8)=km(8,18)
  km(18,9)=km(9,18)
  km(18,10)=km(10,18)
  km(18,11)=km(11,18)
  km(18,12)=km(12,18)
  km(18,13)=km(13,18)
  km(18,14)=km(14,18)
  km(18,15)=km(15,18)
  km(18,16)=km(16,18)
  km(18,17)=km(17,18)
  km(19,1)=km(1,19)
  km(19,2)=km(2,19)
  km(19,3)=km(3,19)
  km(19,4)=km(4,19)
  km(19,5)=km(5,19)
  km(19,6)=km(6,19)
  km(19,7)=km(7,19)
  km(19,8)=km(8,19)
  km(19,9)=km(9,19)
  km(19,10)=km(10,19)
  km(19,11)=km(11,19)
  km(19,12)=km(12,19)
  km(19,13)=km(13,19)
  km(19,14)=km(14,19)
  km(19,15)=km(15,19)
  km(19,16)=km(16,19)
  km(19,17)=km(17,19)
  km(19,18)=km(18,19)
  km(20,1)=km(1,20)
  km(20,2)=km(2,20)
  km(20,3)=km(3,20)
  km(20,4)=km(4,20)
  km(20,5)=km(5,20)
  km(20,6)=km(6,20)
  km(20,7)=km(7,20)
  km(20,8)=km(8,20)
  km(20,9)=km(9,20)
  km(20,10)=km(10,20)
  km(20,11)=km(11,20)
  km(20,12)=km(12,20)
  km(20,13)=km(13,20)
  km(20,14)=km(14,20)
  km(20,15)=km(15,20)
  km(20,16)=km(16,20)
  km(20,17)=km(17,20)
  km(20,18)=km(18,20)
  km(20,19)=km(19,20)
 RETURN
END SUBROUTINE stiff10

